@import "../themeify";

#app {
  // 主体区域 Main container
  .main-container {
    transition: margin-left .28s;
    display: flex;
    flex-direction: row;
  }

  // 侧边栏 Sidebar container
  .sidebar-container {
    transition: width 0.28s;
    @include themeify {
      width: themed('sideBarWidth');
    }
    box-shadow: 0 0px 24px 0 rgba(0, 0, 0, 0.06), 0 1px 0px 0 rgba(0, 0, 0, 0.02);
    font-size: 0px;
    overflow: hidden;
    //reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;

      .el-scrollbar__view {
        height: 100%;
      }
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 18px;
      margin-left: 5px;
      font-size: 16px;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {

      }
    }

    .is-active > .el-submenu__title {

    }

    & .nest-menu .el-submenu > .el-submenu__title,
    & .el-submenu .el-menu-item {
      @include themeify {
        min-width: themed('sideBarWidth') !important;
      }
    ;
      @include background_color('menuBg');
      padding: 0 60px !important;
      height: 48px !important;
      line-height: 48px !important;

      &:hover {

      }
    }
    & .el-submenu .el-menu-item {
      height: 38px !important;
      line-height: 38px !important;
    }
  }
  .el-submenu.is-active.is-opened .el-submenu__title {
    background:#64b0f2;
    color:#fff !important;
    &>i,svg{
      color:#fff !important;
    }
  }
  .el-submenu .nest-menu .el-submenu .el-submenu__title {
    background: #fff;
    color: rgba(43,61,81,0.8) !important;
    & > i,svg {
      color: rgba(43,61,81,0.8) !important;
    }
  }
  .nest-menu .el-submenu.is-opened .el-menu-item{
    padding-left:80px !important;
  }
  .hideSidebar {
    .sidebar-container {
      width: 50px !important;
    }

    .submenu-title-noDropdown {
      padding-left: 10px !important;
      position: relative;

      .el-tooltip {
        padding: 0 10px !important;
      }
    }

    .el-submenu {
      overflow: hidden;

      & > .el-submenu__title {
        padding-left: 10px !important;

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    @include themeify {
      min-width: themed('sideBarWidth') !important;
    }
  ;
  }

  // 适配移动端, Mobile responsive
/*  .mobile {

    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      @include themeify {
        min-width: themed('mobileSideBarWidth') !important;
      }
    ;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        @include themeify {
          transform: translate3d(0 , 0, 0) !important;
        }
      ;
      }
    }
  }*/

  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }

  .el-menu-item, .el-submenu__title {
    height: 48px;
    line-height: 48px;
  }

  // when menu collapsed
  .el-menu--vertical {
    & > .el-menu {
      .svg-icon {
        margin-right: 16px;
      }
    }

    .nest-menu .el-submenu > .el-submenu__title,
    .el-menu-item {
      &:hover {
        // You can use $subMenuHover

      }
    }
  }

  .el-menu {
    @include background_color('menuBg');
  }

  .el-menu-item {
    @include font_color('menuText');
    @include themeify{
      font-size: themed('font-size-base');
    }
  }

  .el-menu-item.is-active {
    @include font_color('menuActiveText');
  }

  .el-menu-item:hover, .el-menu-item:focus {

  }

  .el-submenu__title {
    @include font-color('menuText');
    @include themeify{
      font-size: themed('font-size-base');
    }
  }
  .el-submenu .nest-menu li{
    color:#333
  }
}

